package com.jprocms.module.cms.controller.admin.link.vo;

import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 友情链接 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class LinkBaseVO {

    @Schema(description = "所属站点", requiredMode = Schema.RequiredMode.REQUIRED, example = "14084")
    private Long siteId;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotNull(message = "名称不能为空")
    @DiffLogField(name = "名称")
    private String name;

    @Schema(description = "url", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.jprocms.com")
    @DiffLogField(name = "url")
    private String linkUrl;

    @Schema(description = "logo图片的url", example = "https://www.jprocms.com")
    @DiffLogField(name = "logo图片")
    private String linkLogoUrl;

    @Schema(description = "类型(数据字典cms_link_type值)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "类型(数据字典cms_link_type值)不能为空")
    @DiffLogField(name = "类型")
    private Integer linkType;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序不能为空")
    @DiffLogField(name = "排序")
    private Integer sort;

}
